﻿using System.Collections.Generic;

using System.ServiceModel;

namespace NerdDinnerWCFService
{
    [ServiceContract (Namespace = "http://www.sig.be/NerdDinnerService")]
    public interface IDinnerService
    {
        [OperationContract]
        PaginatedDinnerResultList FindUpcomingDinners(int pageIndex, int pageSize);
        
        [OperationContract]
        DinnerDTO[] FindDinnersByText(string q);
        
        [OperationContract]
        DinnerDTO[] FindAllDinners();
        
        [OperationContract]
        DinnerDTO GetDinner(int id);
      
        [OperationContract]
         [FaultContract(typeof(NotFoundFault))]
         void Delete(int dinnerId);
      
         [OperationContract]
        DinnerViewDTO[] FindByLocation(float latitude, float longitude);

        [OperationContract]
        [FaultContract(typeof(NotFoundFault))]
        void RegisterForDinner(int dinnerId, string user);
        
        [OperationContract]
        int CreateDinner(DinnerDTO dinner);

        [OperationContract]
        [FaultContract(typeof(NotFoundFault))]
        void UpdateDinner(DinnerDTO dinner);
    }
}